package com.chatplus.application.aiprocessor.channel.chat.xunfei.dto;

/**
 * 消息对象
 *
 * @author chj
 * @date 2024/1/5
 **/
public class XunFeiMsgDTO {
    /**
     * 角色
     */
    private String role;
    /**
     * 消息内容
     */
    private String content;
    /**
     * 响应结果字段：结果序号，取值为[0,10]; 当前为保留字段，开发者可忽略
     */
    private Integer index;

    public XunFeiMsgDTO() {
    }
    public XunFeiMsgDTO(String role, String content, Integer index) {
        this.role = role;
        this.content = content;
        this.index = index;
    }

    public static final String ROLE_USER = "user";
    public static final String ROLE_ASSISTANT = "assistant";

    public static XunFeiMsgDTO createUserMsg(String content){
        return new XunFeiMsgDTO(ROLE_USER,content,null);
    }

    public static XunFeiMsgDTO createAssistantMsg(String content){
        return new XunFeiMsgDTO(ROLE_ASSISTANT,content,null);
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }
}
